<template>
  <!-- 客户端渲染的入口节点 -->
  <div id="app">
    <h1>客户端动态交互</h1>
    <h1>{{ message }}</h1>
    <div>
      <input type="text" v-model="message">
    </div>
    <div>
      <button @click="onClick">点击测试</button>
    </div>
    <div>
      <ul>
        <li>
          <router-link to="/">Home</router-link>
        </li>
        <li>
          <router-link to="/about">About</router-link>
        </li>
        <li>
          <router-link to="/posts">Posts</router-link>
        </li>
      </ul>
    </div>
    <router-view />
  </div>
</template>

<script>
  export default {
    name: 'App',
    data () {
      return {
        message: 'Hello World'
      }
    },
    methods: {
      onClick () {
        console.log('btn click')
      }
    }
  }
</script>

<style scoped>

</style>